import React, { memo, useState } from "react";
import { RankingBox } from "./style";
// import {  }
import RankingLeft from "./c-cpns/rankingLeft";
import RankingRight from "./c-cpns/rankingRight";
import myContext from "./createContext";
export default memo(function HYRanking() {
    const [title, setTitle] = useState();
    const setRightName = (title) => {
        setTitle(title);
        console.log("调用父组件", title);
    };
    return (
        <myContext.Provider
            value={{
                name: title,
            }}
        >
            <RankingBox className="wrap-v2">
                <RankingLeft setRightName={setRightName} />
                <RankingRight />
            </RankingBox>
        </myContext.Provider>
    );
});
